package com.xwaiy.xwaiyrpc.fault.tolerant;

import com.xwaiy.xwaiyrpc.model.RpcResponse;
import lombok.extern.slf4j.Slf4j;

import java.util.Map;

/**
 * 静默处理
 * @Author Xwaiy
 * @Date 2025/9/3 17:51
 **/
@Slf4j
public class FailSafeTolerantStrategy implements TolerantStrategy{
    @Override
    public RpcResponse doTolerant(Map<String, Object> context, Exception e) {
        log.warn("服务调用失败，已进行静默容错处理。异常信息: {}", e.getMessage(), e);
        return new RpcResponse();
    }
}
